package com.woniuxy.wd.service;

import java.sql.SQLException;

import com.woniuxy.wd.dao.po.City;
import com.woniuxy.wd.dao.util.DAOFactory;
import com.woniuxy.wd.dao.util.DAOInterface;


public class UserServiceImpl {
	
	//抽象工厂+工厂方法+单例+适配器
	
	public static void main(String[] args) throws SQLException {
		DAOInterface dao = DAOFactory.getFactory().getInstance("city");
		City c = (City) dao.findById(2);
		System.out.println(c.getName());
	}

}
